package com.zzg.learn.service;

import org.jooq.Schema;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

import com.weibo.api.motan.common.MotanConstants;
import com.weibo.api.motan.util.MotanSwitcherUtil;
import com.zzg.learn.jooq.Train;
import com.zzg.common.dao.spring.CommonDaoConfig;

@SpringBootApplication
@Import({ CommonDaoConfig.class})
public class LearnServiceApplication {
	
	@Bean
	public Schema schema() {
		return Train.TRAIN_SCHEMA; // jOOQ生成代码的根目录下与数据库同名的类
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		 SpringApplication.run(LearnServiceApplication.class, args);
		 MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_HEARTBEAT_SWITCHER, true);
		 System.out.println("Server start ...");
	}
	
	

	
	
	
	

}
